using System;
using NUnit.Framework;
using dnA.Math;

namespace dnA.dnAtests.Math 
{
	[TestFixture]
	public class ComplexMath_SqrtTest
	{
		[Test]
		public void Sqrt()
		{
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,1.19209289550780998537e-7)), new ComplexDouble(2.44140624999999742502e-4,2.44140624999999742502e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,-1.19209289550780998537e-7)), new ComplexDouble(2.44140624999999742502e-4,-2.44140624999999742502e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,5.0e-1)), new ComplexDouble(5.0e-1,5.0e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,-5.0e-1)), new ComplexDouble(5.0e-1,-5.0e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,1.0)), new ComplexDouble(7.07106781186547524401e-1,7.07106781186547524401e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,-1.0)), new ComplexDouble(7.07106781186547524401e-1,-7.07106781186547524401e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,2.0)), new ComplexDouble(1.0,1.0), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,-2.0)), new ComplexDouble(1.0,-1.0), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,8.388608e6)), new ComplexDouble(2.048e3,2.048e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(0.0,-8.388608e6)), new ComplexDouble(2.048e3,-2.048e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,0.0)), new ComplexDouble(3.45266983001243544242e-4,0.0), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,0.0)), new ComplexDouble(0.0,3.45266983001243544242e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,1.19209289550780998537e-7)), new ComplexDouble(3.79339349128426676895e-4,1.57127503150776842268e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,-1.19209289550780998537e-7)), new ComplexDouble(3.79339349128426676895e-4,-1.57127503150776842268e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,1.19209289550780998537e-7)), new ComplexDouble(1.57127503150776842268e-4,3.79339349128426676895e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,-1.19209289550780998537e-7)), new ComplexDouble(1.57127503150776842268e-4,-3.79339349128426676895e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,5.0e-1)), new ComplexDouble(5.00000059604648328104e-1,4.99999940395358777324e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,-5.0e-1)), new ComplexDouble(5.00000059604648328104e-1,-4.99999940395358777324e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,5.0e-1)), new ComplexDouble(4.99999940395358777324e-1,5.00000059604648328104e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,-5.0e-1)), new ComplexDouble(4.99999940395358777324e-1,-5.00000059604648328104e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,1.0)), new ComplexDouble(7.07106823333397291369e-1,7.07106739039700269581e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,-1.0)), new ComplexDouble(7.07106823333397291369e-1,-7.07106739039700269581e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,1.0)), new ComplexDouble(7.07106739039700269581e-1,7.07106823333397291369e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,-1.0)), new ComplexDouble(7.07106739039700269581e-1,-7.07106823333397291369e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,2.0)), new ComplexDouble(1.00000002980232283178,9.99999970197678056394e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,-2.0)), new ComplexDouble(1.00000002980232283178,-9.99999970197678056394e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,2.0)), new ComplexDouble(9.99999970197678056394e-1,1.00000002980232283178), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,-2.0)), new ComplexDouble(9.99999970197678056394e-1,-1.00000002980232283178), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,8.388608e6)), new ComplexDouble(2.04800000000001455192e3,2.04799999999998544808e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.19209289550780998537e-7,-8.388608e6)), new ComplexDouble(2.04800000000001455192e3,-2.04799999999998544808e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,8.388608e6)), new ComplexDouble(2.04799999999998544808e3,2.04800000000001455192e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.19209289550780998537e-7,-8.388608e6)), new ComplexDouble(2.04799999999998544808e3,-2.04800000000001455192e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,0.0)), new ComplexDouble(7.07106781186547524401e-1,0.0), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,0.0)), new ComplexDouble(0.0,7.07106781186547524401e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,1.19209289550780998537e-7)), new ComplexDouble(7.07106781186552548697e-1,8.42936970217872868201e-8), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,-1.19209289550780998537e-7)), new ComplexDouble(7.07106781186552548697e-1,-8.42936970217872868201e-8), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,1.19209289550780998537e-7)), new ComplexDouble(8.42936970217872868201e-8,7.07106781186552548697e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,-1.19209289550780998537e-7)), new ComplexDouble(8.42936970217872868201e-8,-7.07106781186552548697e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,5.0e-1)), new ComplexDouble(7.76886987015018653672e-1,3.21797126452791312368e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,-5.0e-1)), new ComplexDouble(7.76886987015018653672e-1,-3.21797126452791312368e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,5.0e-1)), new ComplexDouble(3.21797126452791312368e-1,7.76886987015018653672e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,-5.0e-1)), new ComplexDouble(3.21797126452791312368e-1,-7.76886987015018653672e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,1.0)), new ComplexDouble(8.99453719973933636131e-1,5.55892970251421171992e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,-1.0)), new ComplexDouble(8.99453719973933636131e-1,-5.55892970251421171992e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,1.0)), new ComplexDouble(5.55892970251421171992e-1,8.99453719973933636131e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,-1.0)), new ComplexDouble(5.55892970251421171992e-1,-8.99453719973933636131e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,2.0)), new ComplexDouble(1.1317139242778694103,8.83615530875513265758e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,-2.0)), new ComplexDouble(1.1317139242778694103,-8.83615530875513265758e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,2.0)), new ComplexDouble(8.83615530875513265758e-1,1.1317139242778694103), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,-2.0)), new ComplexDouble(8.83615530875513265758e-1,-1.1317139242778694103), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,8.388608e6)), new ComplexDouble(2.04800006103515715949e3,2.04799993896484465949e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(5.0e-1,-8.388608e6)), new ComplexDouble(2.04800006103515715949e3,-2.04799993896484465949e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,8.388608e6)), new ComplexDouble(2.04799993896484465949e3,2.04800006103515715949e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-5.0e-1,-8.388608e6)), new ComplexDouble(2.04799993896484465949e3,-2.04800006103515715949e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,0.0)), new ComplexDouble(1.0,0.0), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,0.0)), new ComplexDouble(0.0,1.0), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,1.19209289550780998537e-7)), new ComplexDouble(1.00000000000000177636,5.96046447753903933894e-8), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,-1.19209289550780998537e-7)), new ComplexDouble(1.00000000000000177636,-5.96046447753903933894e-8), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,1.19209289550780998537e-7)), new ComplexDouble(5.96046447753903933894e-8,1.00000000000000177636), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,-1.19209289550780998537e-7)), new ComplexDouble(5.96046447753903933894e-8,-1.00000000000000177636), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,5.0e-1)), new ComplexDouble(1.02908551363574612516,2.42934135878322839091e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,-5.0e-1)), new ComplexDouble(1.02908551363574612516,-2.42934135878322839091e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,5.0e-1)), new ComplexDouble(2.42934135878322839091e-1,1.02908551363574612516), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,-5.0e-1)), new ComplexDouble(2.42934135878322839091e-1,-1.02908551363574612516), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,1.0)), new ComplexDouble(1.09868411346780996604,4.55089860562227341304e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,-1.0)), new ComplexDouble(1.09868411346780996604,-4.55089860562227341304e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,1.0)), new ComplexDouble(4.55089860562227341304e-1,1.09868411346780996604), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,-1.0)), new ComplexDouble(4.55089860562227341304e-1,-1.09868411346780996604), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,2.0)), new ComplexDouble(1.27201964951406896425,7.8615137775742328607e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,-2.0)), new ComplexDouble(1.27201964951406896425,-7.8615137775742328607e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,2.0)), new ComplexDouble(7.8615137775742328607e-1,1.27201964951406896425), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,-2.0)), new ComplexDouble(7.8615137775742328607e-1,-1.27201964951406896425), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,8.388608e6)), new ComplexDouble(2.04800012207031613798e3,2.04799987792969113798e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(1.0,-8.388608e6)), new ComplexDouble(2.04800012207031613798e3,-2.04799987792969113798e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,8.388608e6)), new ComplexDouble(2.04799987792969113798e3,2.04800012207031613798e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-1.0,-8.388608e6)), new ComplexDouble(2.04799987792969113798e3,-2.04800012207031613798e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,0.0)), new ComplexDouble(1.4142135623730950488,0.0), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,0.0)), new ComplexDouble(0.0,1.4142135623730950488), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,1.19209289550780998537e-7)), new ComplexDouble(1.41421356237309567684,4.21468485108939241644e-8), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,-1.19209289550780998537e-7)), new ComplexDouble(1.41421356237309567684,-4.21468485108939241644e-8), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,1.19209289550780998537e-7)), new ComplexDouble(4.21468485108939241644e-8,1.41421356237309567684), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,-1.19209289550780998537e-7)), new ComplexDouble(4.21468485108939241644e-8,-1.41421356237309567684), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,5.0e-1)), new ComplexDouble(1.42505312406394700604,1.75432056376293832279e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,-5.0e-1)), new ComplexDouble(1.42505312406394700604,-1.75432056376293832279e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,5.0e-1)), new ComplexDouble(1.75432056376293832279e-1,1.42505312406394700604), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,-5.0e-1)), new ComplexDouble(1.75432056376293832279e-1,-1.42505312406394700604), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,1.0)), new ComplexDouble(1.45534669022535480812,3.43560749722512464139e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,-1.0)), new ComplexDouble(1.45534669022535480812,-3.43560749722512464139e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,1.0)), new ComplexDouble(3.43560749722512464139e-1,1.45534669022535480812), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,-1.0)), new ComplexDouble(3.43560749722512464139e-1,-1.45534669022535480812), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,2.0)), new ComplexDouble(1.55377397403003730734,6.43594252905582624735e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,-2.0)), new ComplexDouble(1.55377397403003730734,-6.43594252905582624735e-1), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,2.0)), new ComplexDouble(6.43594252905582624735e-1,1.55377397403003730734), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,-2.0)), new ComplexDouble(6.43594252905582624735e-1,-1.55377397403003730734), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,8.388608e6)), new ComplexDouble(2.04800024414063955191e3,2.04799975585938955192e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(2.0,-8.388608e6)), new ComplexDouble(2.04800024414063955191e3,-2.04799975585938955192e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,8.388608e6)), new ComplexDouble(2.04799975585938955192e3,2.04800024414063955191e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-2.0,-8.388608e6)), new ComplexDouble(2.04799975585938955192e3,-2.04800024414063955191e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,0.0)), new ComplexDouble(2.89630937574009865995e3,0.0), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,0.0)), new ComplexDouble(0.0,2.89630937574009865995e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,1.19209289550780998537e-7)), new ComplexDouble(2.89630937574009865995e3,2.05795158744599330476e-11), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,-1.19209289550780998537e-7)), new ComplexDouble(2.89630937574009865995e3,-2.05795158744599330476e-11), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,1.19209289550780998537e-7)), new ComplexDouble(2.05795158744599330476e-11,2.89630937574009865995e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,-1.19209289550780998537e-7)), new ComplexDouble(2.05795158744599330476e-11,-2.89630937574009865995e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,5.0e-1)), new ComplexDouble(2.89630937574009994617e3,8.63167457503109387674e-5), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,-5.0e-1)), new ComplexDouble(2.89630937574009994617e3,-8.63167457503109387674e-5), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,5.0e-1)), new ComplexDouble(8.63167457503109387674e-5,2.89630937574009994617e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,-5.0e-1)), new ComplexDouble(8.63167457503109387674e-5,-2.89630937574009994617e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,1.0)), new ComplexDouble(2.89630937574010380482e3,1.72633491500621647541e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,-1.0)), new ComplexDouble(2.89630937574010380482e3,-1.72633491500621647541e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,1.0)), new ComplexDouble(1.72633491500621647541e-4,2.89630937574010380482e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,-1.0)), new ComplexDouble(1.72633491500621647541e-4,-2.89630937574010380482e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,2.0)), new ComplexDouble(2.89630937574011923946e3,3.45266983001241455129e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,-2.0)), new ComplexDouble(2.89630937574011923946e3,-3.45266983001241455129e-4), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,2.0)), new ComplexDouble(3.45266983001241455129e-4,2.89630937574011923946e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,-2.0)), new ComplexDouble(3.45266983001241455129e-4,-2.89630937574011923946e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,8.388608e6)), new ComplexDouble(3.18212909881351640544e3,1.31808102995063321546e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(8.388608e6,-8.388608e6)), new ComplexDouble(3.18212909881351640544e3,-1.31808102995063321546e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,8.388608e6)), new ComplexDouble(1.31808102995063321546e3,3.18212909881351640544e3), 2.3e-016);
			TestHelper.TestRelativeError(ComplexMath.Sqrt(new ComplexDouble(-8.388608e6,-8.388608e6)), new ComplexDouble(1.31808102995063321546e3,-3.18212909881351640544e3), 2.3e-016);
		}
	}
}
